﻿<phone:PhoneApplicationPage 
    x:Class="Croxweb.Leuphana.Pages.PersonPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--Transitions-->
    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:SlideTransition Mode="SlideDownFadeIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:SlideTransition Mode="SlideUpFadeIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:SlideTransition Mode="SlideDownFadeOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:SlideTransition Mode="SlideUpFadeOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <!--LayoutRoot-->
    <Grid x:Name="LayoutRoot" Background="Transparent">

        <controls:Pivot Title="{Binding FullName, Converter={StaticResource UpperCaseConverter}}">
            <!--Contact Data-->
            <controls:PivotItem Header="Profil">
                <ScrollViewer>
                    <StackPanel>
                        <Border Height="173" Width="173" HorizontalAlignment="Left"
                                Background="{StaticResource PhoneAccentBrush}" Margin="12,0,0,36"
                                Visibility="{Binding ImageUrl, Converter={StaticResource StringVisibilityConverter}}">
                            <Image x:Name="Image" Height="173" Width="173" Source="{Binding ImageUri}" />
                        </Border>

                        <Button Click="SendMail_Click" Style="{StaticResource ListButtonStyle}"
                                Visibility="{Binding EmailAddress, Converter={StaticResource StringVisibilityConverter}}">
                            <StackPanel>
                                <TextBlock Text="E-Mail senden" Style="{StaticResource PhoneTextExtraLargeStyle}" />
                                <TextBlock Text="{Binding EmailAddress}" Style="{StaticResource PhoneTextAccentStyle}" />
                            </StackPanel>
                        </Button>
                        <Button Click="CallPhone_Click" Style="{StaticResource ListButtonStyle}"
                                Visibility="{Binding Phone, Converter={StaticResource StringVisibilityConverter}}">
                            <StackPanel>
                                <TextBlock Text="Telefon anrufen" Style="{StaticResource PhoneTextExtraLargeStyle}" />
                                <TextBlock Text="{Binding Phone}" Style="{StaticResource PhoneTextAccentStyle}" />
                            </StackPanel>
                        </Button>
                        <Button Click="CallMobile_Click" Style="{StaticResource ListButtonStyle}"
                                Visibility="{Binding Mobile, Converter={StaticResource StringVisibilityConverter}}">
                            <StackPanel>
                                <TextBlock Text="Mobile anrufen" Style="{StaticResource PhoneTextExtraLargeStyle}" />
                                <TextBlock Text="{Binding Mobile}" Style="{StaticResource PhoneTextAccentStyle}" />
                            </StackPanel>
                        </Button>
                        <Button Click="ShowWebsite_Click" Style="{StaticResource ListButtonStyle}"
                                Visibility="{Binding Website, Converter={StaticResource StringVisibilityConverter}}">
                            <StackPanel>
                                <TextBlock Text="Website anzeigen" Style="{StaticResource PhoneTextExtraLargeStyle}" />
                                <TextBlock Text="{Binding Website}" Style="{StaticResource PhoneTextAccentStyle}" />
                            </StackPanel>
                        </Button>

                        <StackPanel Visibility="{Binding Office, Converter={StaticResource StringVisibilityConverter}}" Margin="0,0,10,20">
                            <TextBlock Text="Büro" Style="{StaticResource PhoneTextExtraLargeStyle}" Foreground="{StaticResource PhoneSubtleBrush}" />
                            <TextBlock Text="{Binding Office}" Style="{StaticResource PhoneTextSubtleStyle}" />
                        </StackPanel>

                        <StackPanel Visibility="{Binding OfficeHours, Converter={StaticResource StringVisibilityConverter}}" Margin="0,0,10,20">
                            <TextBlock Text="Sprechstunde" Style="{StaticResource PhoneTextExtraLargeStyle}" Foreground="{StaticResource PhoneSubtleBrush}" />
                            <TextBlock Text="{Binding OfficeHours}" Style="{StaticResource PhoneTextSubtleStyle}" TextWrapping="Wrap" />
                        </StackPanel>
                    </StackPanel>
                </ScrollViewer>
            </controls:PivotItem>

            <!--CV-->
            <!--<controls:PivotItem Header="Lebenslauf">
                <ScrollViewer>
                    <StackPanel>
                        <TextBlock Text="{Binding ShortCv}" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap" />
                    </StackPanel>
                </ScrollViewer>
            </controls:PivotItem>-->
        </controls:Pivot>

        <!--Progress Bar-->
        <toolkit:PerformanceProgressBar IsIndeterminate="{Binding IsLoading}" Foreground="{StaticResource PhoneAccentBrush}"
                                        Visibility="{Binding IsLoading, Converter={StaticResource BooleanVisibilityConverter}}"
                                        VerticalAlignment="Top" />

    </Grid>

</phone:PhoneApplicationPage>